package cn.ante.ymcc.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* @Description: 自定义全局异常
* @Author: Nai
* @Version: 1.0
* @Date:  2022/8/5 10:49
*/
@Data
public class GlobalException extends RuntimeException{

    /**--------------------------------------------------------
     传一个错误信息给异常对象
     --------------------------------------------------------**/
    private String code;
    public GlobalException(String message,String code){

        super(message);
        this.code = code;
    }
    public GlobalException(String message){
        super(message);
        this.code = code;
    }
}
